-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bullet-featherstone: fix how links are flattened in ConstructSdfModel #562
bullet-featherstone: fix how links are flattened in ConstructSdfModel #562
Conversation
Signed-off-by: Shameek Ganguly <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-physics6 #562 +/- ##
===============================================
+ Coverage 75.95% 77.02% +1.07%
===============================================
Files 143 143
Lines 7327 7321 -6
===============================================
+ Hits 5565 5639 +74
+ Misses 1762 1682 -80
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a test that uses the snippet you provided. I'll look into the easiest way to do that
Minor refactor based on gazebosim#493. Signed-off-by: Steve Peters <[email protected]>
Test for gazebosim#562. Signed-off-by: Steve Peters <[email protected]>
I added a test in 49de232 without this branch, and it fails CI. I will push it to this branch |
@azeey I added a small test for this in case you want to review |
Signed-off-by: Ian Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I think the test I added deserves a second look from someone else if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just a few minor comments.
Signed-off-by: Ian Chen <[email protected]>
Thanks Steve, Ian, Addisu for taking care of this! |
Fixes a segfault in
ConstructSdfModel
when loading a model with links defined out of order. Here's an example model that triggers the segfault:The current logic for sorting links to ensure that a parent link is placed in the
flatLinks
vector before its children links is inadequate for such cases. So the fix is to build the link tree and do a preorder traversal of it to create theflatLinks
vector.